package org.CurrencyDAO.DTO;

public enum CurrencyType {

	THB("THB","bat (Tajlandia)",1l), 
	USD("USD","dolar ameryka�ski",2l),
	AUD("AUD","dolar australijski",3l),
	HKD("HKD","dolar Hongkongu",4l),
	CAD("CAD","dolar kanadyjski",5l),
	NZD("NZD","dolar nowozelandzki",6l),
	SGD("SGD","dolar singapurski",7l),
	EUR("EUR","euro",8l),
	HUF("HUF","forint (W�gry)",9l),
	CHF("CHF","frank szwajcarski",10l),
	GBP("GBP","funt szterling",11l),
	UAH("UAH","hrywna (Ukraina)",12l),
	JPY("JPY","jen (Japonia)",13l),
	CZK("CZK","korona czeska",14l),
	DKK("DKK","korona du�ska",15l),
	ISK("ISK","korona islandzka",16l),
	NOK("NOK","korona norweska",17l),
	SEK("SEK","korona szwedzka", 18l),
	HRK("HRK","kuna chorwacka",19l),
	RON("RON","lej rumu�ski",20l),
	BGN("BGN","lew bu�garski",21l),
	TRY("TRY","lira turecka",22l),
	LTL("LTL","lit litewski",23l),
	ILS("ILS","nowy  izraelski szekel",24l),
	CLP("CLP","peso  chilijskie",25l),
	PHP("PHP","peso filipi�skie",26l),
	MXN("MXN","peso meksyka�skie", 27l),
	ZAR("ZAR","rand (Republika Po�udniowej Afryki)",28l),
	BRL("BRL","real brazylijski",29l),
	MYR("MYR","ringgit malezyjski",30l),
	RUB("RUB","rubel rosyjski",31l),
	IDR("IDR","rupia indonezyjska",32l),
	INR("INR","rupia  indyjska",33l),
	KRW("KRW","won (Korea Po�udniowa)",34l),
	CNY("CNY","yuan renminbi (Chiny)",35l),
	XDR("XDR","SDR (MFW)",36l);
	
	private String currencyName;
	private String currencyCode;
	private Long id;
	
	private CurrencyType(String code, String name, Long id) {
		this.currencyName = name;
		this.currencyCode = code;
		this.id = id;
	}
	
	public String getCurrencyName() {
		return currencyName;
	}
	
	public String getCurrencyCode() {
		return currencyCode;
	}
	
	public Long getId() {
		return id;
	}
	
	public static CurrencyType getCurrencyById(Long id){
		for (CurrencyType type : CurrencyType.values()) {
			if(type.getId().equals(id)){
				return type;
			}
		}
		return null;
	}
}
